from django.shortcuts import render, redirect, reverse
from django.http import HttpResponse


def index(request):
    if request.GET.get('username'):
        return HttpResponse('首页')
    else:
        return redirect(reverse('sign'), permanent=True)

def signup(request):
    return HttpResponse('注册')